object FormUpdateTree: TFormUpdateTree
  Left = 215
  Top = 212
  Width = 401
  Height = 497
  Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1089#1090#1088#1086#1082#1080' '#1074' '#1088#1091#1073#1088#1080#1082#1072#1090#1086#1088
  Color = clBtnFace
  Constraints.MinHeight = 250
  Constraints.MinWidth = 400
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  OnCreate = FormCreate
  OnDestroy = FormDestroy
  DesignSize = (
    393
    463)
  PixelsPerInch = 96
  TextHeight = 13
  object BitBtnClose: TBitBtn
    Left = 309
    Top = 432
    Width = 77
    Height = 25
    Anchors = [akRight, akBottom]
    Cancel = True
    Caption = #1047#1072#1082#1088#1099#1090#1100
    Default = True
    ModalResult = 1
    TabOrder = 0
    Glyph.Data = {
      DE010000424DDE01000000000000760000002800000024000000120000000100
      0400000000006801000000000000000000001000000000000000000000000000
      80000080000000808000800000008000800080800000C0C0C000808080000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00388888888877
      F7F787F8888888888333333F00004444400888FFF444448888888888F333FF8F
      000033334D5007FFF4333388888888883338888F0000333345D50FFFF4333333
      338F888F3338F33F000033334D5D0FFFF43333333388788F3338F33F00003333
      45D50FEFE4333333338F878F3338F33F000033334D5D0FFFF43333333388788F
      3338F33F0000333345D50FEFE4333333338F878F3338F33F000033334D5D0FFF
      F43333333388788F3338F33F0000333345D50FEFE4333333338F878F3338F33F
      000033334D5D0EFEF43333333388788F3338F33F0000333345D50FEFE4333333
      338F878F3338F33F000033334D5D0EFEF43333333388788F3338F33F00003333
      4444444444333333338F8F8FFFF8F33F00003333333333333333333333888888
      8888333F00003333330000003333333333333FFFFFF3333F00003333330AAAA0
      333333333333888888F3333F00003333330000003333333333338FFFF8F3333F
      0000}
    NumGlyphs = 2
  end
  object Tree: TTreeView
    Left = 8
    Top = 8
    Width = 377
    Height = 417
    Anchors = [akLeft, akTop, akRight, akBottom]
    Indent = 19
    ReadOnly = True
    TabOrder = 1
    OnChange = TreeChange
    OnExpanding = TreeExpanding
    Items.Data = {
      020000001F0000000000000000000000FFFFFFFFFFFFFFFF0000000001000000
      06546573746F31210000000000000000000000FFFFFFFFFFFFFFFF0000000000
      00000008546573746F2031321D0000000000000000000000FFFFFFFFFFFFFFFF
      000000000100000004CAF0F3E3200000000000000000000000FFFFFFFFFFFFFF
      FF000000000000000007CAF0F3E3203130}
  end
  object BitBtnSameNode: TBitBtn
    Left = 104
    Top = 430
    Width = 105
    Height = 25
    Anchors = [akLeft, akBottom]
    Caption = #1053#1086#1074#1099#1081' '#1087#1086#1076#1088#1072#1079#1076#1077#1083
    TabOrder = 2
    OnClick = BitBtnSameNodeClick
  end
  object BitBtnNewNode: TBitBtn
    Left = 8
    Top = 430
    Width = 89
    Height = 25
    Anchors = [akLeft, akBottom]
    Caption = #1053#1086#1074#1099#1081' '#1088#1072#1079#1076#1077#1083
    TabOrder = 3
    OnClick = BitBtnNewNodeClick
  end
  object BitBtnDelete: TBitBtn
    Left = 215
    Top = 432
    Width = 82
    Height = 25
    Anchors = [akLeft, akBottom]
    Caption = #1059#1076#1072#1083#1080#1090#1100' '
    TabOrder = 4
    OnClick = BitBtnDeleteClick
    Glyph.Data = {
      36050000424D3605000000000000360400002800000010000000100000000100
      0800000000000001000000000000000000000001000000010000000000003232
      3200FFFFFF00E2E2E200E0E0E000DFDFDF00DEDEDE00DDDDDD00DCDCDC00DBDB
      DB000E0E0E0004064C00DADADA00D9D9D900B3B5FB006B6FF7006D71F7001A1A
      1A00787CF8004348F5007377F800D8D8D8000E14F3002B31F4009B9EFA005A5E
      F6007A7DF8002127F3002329F400D7D7D7000C12E4002C31F4006F73F800454A
      F5000C12DD00D6D6D600494EF6001B21F300181EF300D5D5D5008689F900676B
      F7001016F3000B10D3000D13F0001F25F3000B10C800D4D4D4003237F4000A0F
      BC000C12D5000C12E600D3D3D300090DA2000A0FB8000B10CD0012157A00D2D2
      D200D1D1D100D0D0D00000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000000000003B3B3B3B3B01
      010101010101010101013B3B3B3B3B01020202020202020202013B3B3B3B3B01
      0223272F34393A3B02013B0A0A3B3B010B0B23272F34393A02010A35360A3B00
      37380B23272F343902010A302231003233220B1D23272F3402010A28292A2B2C
      2D2E0B151D23272F02013B0A24171625260B090C0D1D232702013B0A1E1F2021
      220B08090C151D2302010A162018191A1B2E0B08090D151D02010A2018101112
      1A1B0B07080C0D1502010A0E0F113B1113140B0607090C0D02013B0A0A3B3B01
      0B0B05050607080902013B3B3B3B3B01020202020202020202013B3B3B3B3B01
      010101010101010101013B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B}
  end
  object qTreeDelete: TZQuery
    Connection = FormMain.ZC
    SQL.Strings = (
      'UPDATE prices_tree'
      'SET pt_isclosed =1, pt_date = :ptdate'
      'WHERE (pt_id = :id)'
      'or (pt_parentid = :id)')
    Params = <
      item
        DataType = ftUnknown
        Name = 'ptdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
    WhereMode = wmWhereAll
    Options = []
    Left = 192
    Top = 72
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'ptdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
  end
  object qLinesDelete: TZQuery
    Connection = FormMain.ZC
    SQL.Strings = (
      'UPDATE price_lines'
      'SET pl_isclosed =1, pl_date_update = :ptdate'
      'WHERE (pl_treeid = :id)'
      'or pl_treeid  in (select pt_id from prices_tree'
      'WHERE pt_parentid = :id)')
    Params = <
      item
        DataType = ftUnknown
        Name = 'ptdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
    WhereMode = wmWhereAll
    Options = []
    Left = 272
    Top = 72
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'ptdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
  end
  object qSubTreeExists: TZQuery
    Connection = FormMain.ZC
    SQL.Strings = (
      'SELECT COUNT(pt_id) AS cntr FROM prices_tree pt'
      'WHERE pt_parentid =:parentid'
      'and pt_isclosed =0')
    Params = <
      item
        DataType = ftUnknown
        Name = 'parentid'
        ParamType = ptUnknown
      end>
    WhereMode = wmWhereAll
    Options = []
    Left = 128
    Top = 144
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'parentid'
        ParamType = ptUnknown
      end>
    object IntegerField2: TIntegerField
      FieldName = 'CNTR'
      ReadOnly = True
    end
  end
  object QTreeClose: TZQuery
    Connection = FormMain.ZC
    SQL.Strings = (
      'update prices_tree pt'
      'set pt_isclosed = 1, pt_date = :cdate'
      'WHERE pt_id =:id'
      'and pt_isclosed =0')
    Params = <
      item
        DataType = ftUnknown
        Name = 'cdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
    WhereMode = wmWhereAll
    Options = []
    Left = 216
    Top = 144
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'cdate'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'id'
        ParamType = ptUnknown
      end>
  end
end
